home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Graphismes / Vidéo / MooVer 1.3 / Bonk.POV < prev    next >
Text File  |  1995-12-02  |  8KB  |  371 lines

  1. // Persistence of Vision Ray tracer Scene description file
  2. // File: Bonk.pov
  3. // Vers: 2 or 3
  4. // Desc: Perpetual hammer bonking some balls...
  5. //       A looped animation example for MooVer 1.3
  6. //
  7. // Settings:
  8. //   Quality=9
  9. //   Antialias=On
  10. //   Antialias_Threshold=0.1
  11. //   Antialias_Depth=3
  12. //   Start_Frame=1
  13. //   End_Frame=8
  14. //   Final_Frame=9
  15. //   Initial_Clock=0
  16. //   Final_Clock=1
  17. //
  18. // Date: 11/15/95
  19. // Auth: Eduard [esp] Schwan
  20. //
  21.  
  22. // ==== Standard POV-Ray Includes
  23. #include "colors.inc"     // Standard Color definitions
  24. #include "textures.inc"     // Standard Texture definitions
  25.  
  26. #declare AnimClock =  clock // POV-Ray's clock variable (range:0.0 to 1.0)
  27.  
  28. // twist the entire structure at an angle away from viewer
  29. #declare YAngle = -50
  30.  
  31. // ==== set viewer's position in the scene
  32. camera
  33. {
  34.   location  <0.0, 2, -6.0> // position of camera <X Y Z>
  35.   direction 1.0*z            // which way are we looking <X Y Z>
  36. //sky       y                // rarely used
  37.   up        y                // which way is +up <X Y Z>
  38.   right     4/3*x            // which way is +right <X Y Z> and aspect ratio
  39.   look_at   <0.0, 0.5,  0.0> // point center of view at this point <X Y Z>
  40. }
  41.  
  42. // ==== create a "spotlight" (directed) light source
  43. light_source
  44. {
  45.   0*x // light's position (translated below)
  46.   color red 0.8  green 1.0  blue 0.8  // light's color
  47. //  looks_like { sphere { 0*x, 1 texture {pigment{color Yellow}finish{ambient 1 diffuse 0}} } }
  48.   spotlight // this kind of light source
  49.   translate <0, 5, -8>   // <x y z> position of light
  50.   point_at <0, 0, 0>     // direction of spotlight
  51.   radius 10              // hotspot (inner, in degrees)
  52.   falloff 15             // intensity falloff radius (outer, in degrees)
  53.   // enable this line to get soft shadows (and slow down rendering!)
  54.   area_light <2, 0, 0> <0, 2, 0> 4, 4 adaptive 0 jitter
  55.  }
  56.  
  57.  
  58. light_source
  59. {
  60.   0*x // light's position (translated below)
  61.   color red 1.0  green 0.8  blue 0.8  // light's color
  62. //  looks_like { sphere { 0*x, 1 texture {pigment{color Yellow}finish{ambient 1 diffuse 0}} } }
  63.   spotlight // this kind of light source
  64.   translate <-3, 5, -8>   // <x y z> position of light
  65.   point_at <-1, 0, 0>     // direction of spotlight
  66.   radius 10               // hotspot (inner, in degrees)
  67.   falloff 15              // intensity falloff radius (outer, in degrees)
  68.   // enable this line to get soft shadows (and slow down rendering!)
  69.   area_light <2, 0, 0> <0, 2, 0> 4, 4 adaptive 0 jitter
  70. }
  71.  
  72. // ==== Sky sphere
  73. #declare SkyTex =
  74. texture
  75. {
  76.   pigment
  77.     {
  78.       bozo
  79.       turbulence 0.3   omega 0.7
  80.       rotate 70*y // across the sky
  81.       color_map {[0.7 color rgb <0.6,0.7,1.0>] [0.8 color rgb 0.8] [0.9 color rgb 1.0]}
  82.       scale <90, 5, 5>
  83.     }
  84.   finish {ambient 1 diffuse 0}
  85. }
  86.  
  87. sphere
  88. {
  89.   <0, 0, 0> // center of sphere <X Y Z>
  90.   100.0       // radius of sphere
  91.   texture { SkyTex }
  92. }
  93.  
  94. // ==== floor
  95. plane
  96. {
  97.   y, // <X Y Z> unit surface normal, vector points "away from surface"
  98.   -1.0 // distance from the origin in the direction of the surface normal
  99.   texture
  100.   {
  101.     pigment
  102.     {
  103.       marble turbulence 0.7 rotate -20*y scale 2
  104.       color_map {[0.8 color White] [0.9 color rgb <0.8,0.9,1>] [1.0 color rgb <0.8,0.6,0.3>]}
  105.     }
  106.     finish {ambient 0.25 reflection 0.2}
  107.   }
  108. }
  109.  
  110. // ==== Supports (Barrel shape)
  111.  
  112. #declare SupportZOffset = 5
  113.  
  114. #declare SupportShape =
  115. intersection
  116. {
  117.   sphere
  118.   {
  119.     0*x, 1 scale <1,2,1> // elongate it upwards
  120.   }
  121.   cylinder // cut it off at top and bottom
  122.   {
  123.     -1*y, +1*y, 1.1
  124.   }
  125. }
  126.  
  127. #declare SupportTex =
  128. texture
  129. {
  130.  pigment { color rgb <0.5,1.0,0.5> } finish {reflection 0.5 metallic specular 0.5}
  131. }
  132.  
  133. union
  134. {
  135.   // supports
  136.   object
  137.   {
  138.     SupportShape
  139.     scale 2
  140.     texture {SupportTex}
  141.     translate -SupportZOffset*z
  142.   }
  143.   object
  144.   {
  145.     SupportShape
  146.     scale 2
  147.     texture {SupportTex}
  148.     translate +SupportZOffset*z
  149.   }
  150.   // move it up above floor
  151.   translate 1*y
  152.   rotate YAngle*y // angle it
  153. }
  154.  
  155. // ==== Bonker wheel
  156.  
  157. #declare BonkHammerShape =
  158. intersection
  159. {
  160.   cylinder
  161.   {
  162.     -1*x, +1*x, 1
  163.   }
  164.   sphere
  165.   {
  166.     0*x, 1.25
  167.   }
  168.   scale <0.4, 0.3, 0.3> // elongaate it
  169. }
  170.  
  171. union
  172. {
  173.   // inner wheel
  174.   union
  175.   {
  176.     torus  { 0.60, 0.14  rotate 90*x }
  177.     torus  { 0.40, 0.16  rotate 90*x }
  178.     torus  { 0.15, 0.25  rotate 90*x }
  179.     sphere { 0*x, 0.2 scale <1,1,4> }
  180.     texture
  181.     {
  182.       pigment
  183.       {
  184.         radial rotate 90*x frequency 6
  185.         color_map
  186.         {
  187.           [0.0 color rgb 0]
  188.           [1.0 color rgb 1]
  189.         }
  190.       }
  191.       finish {specular 0.5 reflection 0.1 metallic}
  192.     }
  193.   }
  194.   // shaft
  195.   box
  196.   {
  197.     -1*(x+y+z), +1*(x+y+z)
  198.     scale <0.1, 1.7, 0.1> // skinny and tall
  199.     texture { pigment {wood turbulence 0.2 rotate 95*x scale 0.2} finish {specular 0.4 roughness 0.05}}
  200.   }
  201.   // bottom hammer
  202.   object
  203.   {
  204.     BonkHammerShape
  205.     translate -1.7*y
  206.     texture {Bright_Bronze}
  207.   }
  208.   // top hammer
  209.   object
  210.   {
  211.     BonkHammerShape
  212.     translate +1.7*y
  213.     texture {Bright_Bronze}
  214.   }
  215.   // rotate on its origin
  216.   rotate AnimClock*180*z
  217.   // move it up above floor
  218.   translate 1*y
  219.   rotate YAngle*y // angle it
  220. }
  221.  
  222. // == balls
  223.  
  224. // initially move ball away from hammer by a small amount
  225. #declare BallXPosTweak = 0.4
  226.  
  227. // gee, what distance would a 1 unit diameter ball roll?
  228. #declare BallXSpeed = 3.1415926 // ...
  229.  
  230. #declare BallTex =
  231. texture
  232. {
  233.   pigment
  234.   {
  235.     gradient x  scale 1.3
  236.     color_map
  237.     {
  238.       [0.0 color rgb <0.5, 0.1, 0.1>] [0.1 color rgb <0.9, 0.7, 0.6>] [0.9 color rgb <0.9, 0.7, 0.6>] [1.0 color rgb <0.5, 0.1, 0.1>]
  239.     }
  240.   }
  241.   finish {reflection 0.5 specular 0.2 metallic roughness 0.001}
  242. }
  243.  
  244. sphere
  245. {
  246.   0*x, 1.0
  247.   texture {BallTex}
  248.   scale 0.5
  249.   rotate -360*z*AnimClock
  250.   translate BallXSpeed*x*(-5+AnimClock+BallXPosTweak)
  251.   translate -0.5*y // drop down to the floor
  252.   rotate YAngle*y // angle it
  253. }
  254.  
  255. sphere
  256. {
  257.   0*x, 1.0
  258.   texture {BallTex}
  259.   scale 0.5
  260.   rotate -360*z*AnimClock
  261.   translate BallXSpeed*x*(-4+AnimClock+BallXPosTweak)
  262.   translate -0.5*y // drop down to the floor
  263.   rotate YAngle*y // angle it
  264. }
  265.  
  266. sphere
  267. {
  268.   0*x, 1.0
  269.   texture {BallTex}
  270.   scale 0.5
  271.   rotate -360*z*AnimClock
  272.   translate BallXSpeed*x*(-3+AnimClock+BallXPosTweak)
  273.   translate -0.5*y // drop down to the floor
  274.   rotate YAngle*y // angle it
  275. }
  276.  
  277. sphere
  278. {
  279.   0*x, 1.0
  280.   texture {BallTex}
  281.   scale 0.5
  282.   rotate -360*z*AnimClock
  283.   translate BallXSpeed*x*(-2+AnimClock+BallXPosTweak)
  284.   translate -0.5*y // drop down to the floor
  285.   rotate YAngle*y // angle it
  286. }
  287.  
  288. sphere
  289. {
  290.   0*x, 1.0
  291.   texture {BallTex}
  292.   scale 0.5
  293.   rotate -360*z*AnimClock
  294.   translate BallXSpeed*x*(-1+AnimClock+BallXPosTweak)
  295.   translate -0.5*y // drop down to the floor
  296.   rotate YAngle*y // angle it
  297. }
  298.  
  299. sphere
  300. {
  301.   0*x, 1.0
  302.   texture {BallTex}
  303.   scale 0.5
  304.   rotate -360*z*AnimClock
  305.   translate BallXSpeed*x*(0+AnimClock+BallXPosTweak)
  306.   translate -0.5*y // drop down to the floor
  307.   rotate YAngle*y // angle it
  308. }
  309.  
  310. sphere
  311. {
  312.   0*x, 1.0
  313.   texture {BallTex}
  314.   scale 0.5
  315.   rotate -360*z*AnimClock
  316.   translate BallXSpeed*x*(+1+AnimClock+BallXPosTweak)
  317.   translate -0.5*y // drop down to the floor
  318.   rotate YAngle*y // angle it
  319. }
  320.  
  321. sphere
  322. {
  323.   0*x, 1.0
  324.   texture {BallTex}
  325.   scale 0.5
  326.   rotate -360*z*AnimClock
  327.   translate BallXSpeed*x*(+2+AnimClock+BallXPosTweak)
  328.   translate -0.5*y // drop down to the floor
  329.   rotate YAngle*y // angle it
  330. }
  331.  
  332. sphere
  333. {
  334.   0*x, 1.0
  335.   texture {BallTex}
  336.   scale 0.5
  337.   rotate -360*z*AnimClock
  338.   translate BallXSpeed*x*(+3+AnimClock+BallXPosTweak)
  339.   translate -0.5*y // drop down to the floor
  340.   rotate YAngle*y // angle it
  341. }
  342.  
  343.  
  344.  
  345. sphere
  346. {
  347.   0*x, 1.0
  348.   texture {BallTex}
  349.   scale 0.5
  350.   rotate -360*z*AnimClock
  351.   translate BallXSpeed*x*(+4+AnimClock+BallXPosTweak)
  352.   translate -0.5*y // drop down to the floor
  353.   rotate YAngle*y // angle it
  354. }
  355.  
  356.  
  357.  
  358. sphere
  359. {
  360.   0*x, 1.0
  361.   texture {BallTex}
  362.   scale 0.5
  363.   rotate -360*z*AnimClock
  364.   translate BallXSpeed*x*(+5+AnimClock+BallXPosTweak)
  365.   translate -0.5*y // drop down to the floor
  366.   rotate YAngle*y // angle it
  367. }
  368.  
  369. // <eof>
  370.  
  371.